/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class DoctorCriteria extends AbstractORMCriteria {
	public final IntegerExpression idDoctor;
	public final StringExpression DNI;
	public final StringExpression especialidad;
	public final StringExpression name;
	public final StringExpression lastName;
	
	public DoctorCriteria(Criteria criteria) {
		super(criteria);
		idDoctor = new IntegerExpression("idDoctor", this);
		DNI = new StringExpression("DNI", this);
		especialidad = new StringExpression("especialidad", this);
		name = new StringExpression("name", this);
		lastName = new StringExpression("lastName", this);
	}
	
	public DoctorCriteria(PersistentSession session) {
		this(session.createCriteria(Doctor.class));
	}
	
	public DoctorCriteria() throws PersistentException {
		this(orm.Taller1PDSPersistentManager.instance().getSession());
	}
	
	public BabyMonitorCriteria createBabyMonitorCriteria() {
		return new BabyMonitorCriteria(createCriteria("babyMonitor"));
	}
	
	public Doctor uniqueDoctor() {
		return (Doctor) super.uniqueResult();
	}
	
	public Doctor[] listDoctor() {
		java.util.List list = super.list();
		return (Doctor[]) list.toArray(new Doctor[list.size()]);
	}
}

